class User < ActiveRecord::Base
  validates_presence_of :name,:message =>"这个用户没有姓名吗?"
  has_one :photo,:dependent=>:destroy
#  belongs_to :level
#  belongs_to :rank
  has_many :conventioners,:dependent=>:destroy
  has_many :events,:through=>:conventioners,:source=>:event
  acts_as_reportable
end